package com.devicemantra.coordinate.ds.tests;
import com.devicemantra.coordinate.dataobjects.*;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.jdo.PersistenceManager;
import javax.servlet.ServletException;
import javax.servlet.http.*;

import com.devicemantra.coordinate.dataobjects.CDepartmentFactory;
import com.devicemantra.coordinate.exceptions.operations.CDepartmentDoesNotExistsException;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

@SuppressWarnings("serial")
public class ViewDepartment extends HttpServlet 
{
	private static final Logger log = Logger.getLogger(ViewDepartment.class.getName());
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException 
	{
		log.log(Level.INFO, "Started viewdepartment logging");
		resp.setContentType("text/html");
		resp.getOutputStream().print("Testing servlet");
		resp.flushBuffer();
		return;	
		
		
	}  
}

/* 
 * CDepartment lDepartment = null;
		try {
			lDepartment = CDepartmentFactory.getDepartment(lDept);
		} catch (CDepartmentDoesNotExistsException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		if(lDepartment != null)
		{
			/* Forward it to view_department.jsp */
			/*try
			{
				req.getSession().setAttribute("DEPT", lDepartment);
				System.out.println("Forwarding request to /modules/administration/view_department.jsp");
				req.getRequestDispatcher("/modules/administration/view_department.jsp").forward(req,resp);
			}
			catch(Exception e ) 
			{ 
				e.printStackTrace();
			}
		}
		
	*/
 

